import { useContext } from "react";
import { Context } from "./UseContextDemo";
function ContextCom1(){

   const {setCounts,counts}= useContext(Context)!;


    return (
        <div style={{width:'400px',height:'100px',background:'red'}}>
           子组件1 {counts}

           <button onClick={()=>setCounts(counts+1)}>++</button>
        </div>
    )

}
export default ContextCom1;